<template>
  <div>
    <div v-if="showAllWords">
      <div >
        <span @click="goBack"><</span>
        <div></div>
      </div>
      文本
    </div>

    <el-tabs v-else v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="文献库" name="1" class="pane-1">
        <paneOne></paneOne>
      </el-tab-pane>
      <el-tab-pane label="推荐文献" name="2">配置管理</el-tab-pane>
      <el-tab-pane label="我的收藏" name="3">
        <paneThree @showWords="showWords"></paneThree>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import paneOne from "@/components/write/writeManage/docManage/paneOne.vue";
import paneThree from "@/components/write/writeManage/docManage/paneThree.vue";
export default {
  name: "docManage",
  components: { paneOne, paneThree },
  data() {
    return {
      activeName: "1",
      showAllWords: false,
    };
  },
  mounted() {},
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    showWords(i) {
      this.showAllWords = !this.showAllWords;
      console.log(i);
    },
    goBack(){
      this.showAllWords = !this.showAllWords;
    }
  },
};
</script>

<style lang="scss" scoped>
.pane-1 {
  .docList {
    & li {
      padding: 6px 10px;
      border-bottom: 1px solid #ccc;
    }
  }
}
</style>